package com.example.gybicycle.common.security;

import lombok.Getter;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author jqllxew
 * 2020/10/22.
 */
@Getter
public class Token implements AuthenticationToken {

    private String token;
    private String host;
    public Token(String token) {
        this(token, null);
    }
    public Token(String token, String host) {
        this.token = token;
        this.host = host;
    }
    @Override
    public Object getPrincipal() {
        return token;
    }
    @Override
    public Object getCredentials() {
        return token;
    }
}